package cn.pegasus.teamwork.appinterface.session;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class AppWebServerSessionListener implements HttpSessionListener {
	
	private MySessionContext myc = MySessionContext.getInstance();

	@Override
	public void sessionCreated(HttpSessionEvent httpSessionEvent) {
		myc.addSession(httpSessionEvent.getSession());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
		HttpSession session = httpSessionEvent.getSession();
		myc.DelSession(session);
	}

}